package com.example.playlet.controller.sensitive;

import com.example.playlet.entity.sensitive.SensitiveWords;
import com.example.playlet.service.sensitive.ISensitiveWordsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;


@Slf4j
@RestController
@RequestMapping("api/front/sensitive")
public class SensitiveWordsController {

    @Autowired
    ISensitiveWordsService sensitiveWordsService;

    @RequestMapping(value = "/query", method = RequestMethod.GET)
    public String getQuery(String text) {
        String message = sensitiveWordsService.filterText(text);
 
        return message;
    }
}
